# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Contributor: Brad Fanella <cesura@archlinux.org>
# Contributor: Martin Wimpress <code@flexion.org>

pkgname=libmatemixer
pkgver=1.26.1
pkgrel=1
pkgdesc="Mixer library for MATE Desktop"
url="https://mate-desktop.org"
arch=('loong64' 'x86_64')
license=('LGPL')
depends=('glib2' 'gettext' 'libpulse' 'alsa-lib')
source=("https://pub.mate-desktop.org/releases/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('4960f59a6b9faf82a01d4a4b8cc260b4868dd991efd4a9b17b5d0a15a1d3a1ae')

build() {
    	cd "${pkgname}-${pkgver}"
    	./configure \
        	--prefix=/usr \
        	--sysconfdir=/etc \
        	--localstatedir=/var

    	#https://bugzilla.gnome.org/show_bug.cgi?id=656231
    	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    	make
}

package() {
    	cd "${pkgname}-${pkgver}"
    	make DESTDIR="${pkgdir}" install
}
